home *** CD-ROM | disk | FTP | other *** search
- 0, In this demonstration, you will see how to create
- 4, a new ActiveX DLL project in Visual Basic 5.0, and
- 7, how to set properties for the project. To create a
- 11, new project in Visual Basic 5.0, choose File, New
- 15, Project. There are several types of projects you
- 19, can choose from. Standard EXE creates a standard
- 23, Windows program. ActiveX EXE creates an executable
- 28, that is an automation server. ActiveX DLL creates
- 32, a dynamic link library that is an automation
- 34, server, as well. And ActiveX control creates a control
- 38, with a graphical interface that can be used in
- 40, ActiveX control containers. Since we are creating
- 44, ActiveX server components, I will choose ActiveX DLL.
- 51, Once the project is created, you can see all the
- 53, files that are in the project by looking at the
- 56, Project Explorer. Here we can see that a new class
- 60, module, called Class1, was created by default. You
- 66, can set properties for the project by choosing
- 68, Project, Project1 Properties. In the Project
- 75, Properties dialog box, you can change settings that affect
- 78, the whole project. The project type determines
- 82, the type of project. Since I initially selected
- 85, ActiveX DLL, the type is set to ActiveX DLL. The
- 90, startup object allows you to indicate what object is
- 92, called when the DLL runs. By default it is set to
- 96, none, since ActiveX DLLs are normally started by other
- 100, programs. However, you could write a sub Main to
- 104, contain code to run every time the DLL is loaded.
- 108, The project name is the beginning part of the
- 111, ProgID. For example, if I name this project Math and
- 116, later name a class module Square, an outside program
- 120, would create the class module by using the name
- 123, Math.Square. If you have a Help file for this
- 126, project, you can make it part of the project by
- 128, providing its path in Help File Name. You can also
- 132, indicate the Context ID to be used when someone browses
- 136, for default help. The project description provides
- 140, a human readable description of the project. For
- 143, example, since this Math project contains objects
- 146, that perform math functions, I could name it Math
- 150, Objects. The project description will show up in
- 154, the object browser when someone browses this DLL, and
- 157, when someone makes a library reference to it.
- 161, Unattended execution indicates that the user will not
- 164, interact with the DLL. Checking this box will
- 167, make your DLL apartment threaded. Once you have set
- 170, the project properties, you are ready to add methods
- 173, and code to create an ActiveX server component.
- 177, END